<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <base href="/" />
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
  <title>广西大学实验室综合管理平台</title>
  <link rel="stylesheet" type="text/css" href="assets/portal/template5/common.css" />
</head>
<body>
<div class="header<%= ' page' if @is_index.nil? %>">
  <div class="nav">
    <div class="content">
      <ul>
        <li>
          <a href="portal/index/<%= params[:id] %>">首页</a>
        </li>
        <% @head_article_types.each_with_index do |head_article_type, i| %>
        <li>
          <a href="portal/list/<%= "#{params[:id]}/#{head_article_type.id}" %>"><%= head_article_type.name %></a>
          <% head_article_type_menus = @head_article_types[i].children
             if head_article_type_menus.present? %>
          <div class="menu">
            <ul>
              <% head_article_type_menus.each do |head_article_type_menu| %>
              <li><a href="portal/list/<%= "#{params[:id]}/#{head_article_type_menu.id}" %>"><%= head_article_type_menu.name %></a></li>
              <% end %>
            </ul>
          </div>
          <% end %>
        </li>
        <% end %>
        <li>
          <a href="javascript:;">平台入口</a>
          <div class="menu">
            <ul>
              <li><a href="/front/student_extend_new">实验室安全学习考试</a></li>
              <li><a href="/front">教工登录</a></li>
              <li><a href="/admin">管理登录</a></li>
            </ul>
          </div>
        </li>
      </ul>
    </div>
  </div>
  <div class="banner">
    <div class="logo">
      <div class="pic">
        <img src="assets/portal/template1/<%= @organization.type == School.name ? 'logo.png' : 'bannerLogo.png' %>" alt="学校Logo" />
      </div>
      <% if @organization.type == College.name %>
      <div class="text">
        <div class="chinese-name"><%= @organization.name %></div>
        <div class="english-name"><%= @organization.english_name %></div>
      </div>
      <% end %>
    </div>
  </div>
</div>

<%= yield %>

<div class="footer">
  <div class="content">
    <div class="links left">
      <div class="title">友情链接</div>
      <ul>
        <% @index_friend_link_configs.each do |index_friend_link_config| %>
        <li><a href="<%= index_friend_link_config.url %>"><%= index_friend_link_config.name %></a></li>
        <% end %>
      </ul>
    </div>
    <div class="info">
      <div class="logo">
        <img src="assets/portal/template2/<%= @organization.type == School.name ? 'belowLogo.png' : 'bannerLogo.png' %>" alt="学校Logo" />
        <% if @organization.type == College.name %>
            <div class="text">
              <div class="chinese-name"><%= @organization.name %></div>
              <div class="english-name"><%= @organization.english_name %></div>
            </div>
        <% end %>
      </div>
      <div class="copyright">桂ICP备05000940号&nbsp;广西大学版权所有</div>
    </div>
    <div class="links right">
      <ul>
        <% @head_article_types.each do |head_article_type| %>
        <li><a href="portal/list/<%= "#{params[:id]}/#{head_article_type.id}" %>"><%= head_article_type.name %></a></li>
        <% end %>
      </ul>
    </div>
  </div>
</div>

<script type="text/javascript" src="assets/portal/jquery.min.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    var lastMenuElement = $(".header .content ul li .menu").last();
    lastMenuElement.css("marginLeft", (22 - lastMenuElement.parent().width()) + "px");
  });
</script>

</body>
</html>